home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- ClientHeight = 4995
- ClientLeft = 1590
- ClientTop = 2235
- ClientWidth = 6210
- ClipControls = 0 'False
- FillColor = &H00FFFFFF&
- FillStyle = 0 'Solid
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 5685
- Icon = NLOTTERY.FRX:0000
- Left = 1530
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 4995
- ScaleWidth = 6210
- Top = 1605
- Width = 6330
- Begin Timer Timer2
- Enabled = 0 'False
- Interval = 2000
- Left = 120
- Top = 4320
- End
- Begin Timer Timer1
- Left = 120
- Top = 3960
- End
- Begin CommandButton Command1
- Caption = "&Go !"
- Default = -1 'True
- Height = 492
- Left = 2400
- TabIndex = 2
- Top = 3720
- Width = 1092
- End
- Begin Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Index = 5
- Left = 5040
- MousePointer = 3 'I-Beam
- TabIndex = 3
- Top = 1500
- Width = 435
- End
- Begin Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Index = 4
- Left = 4200
- MousePointer = 3 'I-Beam
- TabIndex = 8
- Top = 1500
- Width = 435
- End
- Begin Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Index = 3
- Left = 3360
- MousePointer = 3 'I-Beam
- TabIndex = 7
- Top = 1500
- Width = 435
- End
- Begin Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Index = 2
- Left = 2520
- MousePointer = 3 'I-Beam
- TabIndex = 6
- Top = 1500
- Width = 435
- End
- Begin Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Index = 1
- Left = 1680
- MousePointer = 3 'I-Beam
- TabIndex = 5
- Top = 1500
- Width = 435
- End
- Begin Label Label3
- Alignment = 2 'Center
- Caption = "GOOD LUCK !"
- FontBold = 0 'False
- FontItalic = -1 'True
- FontName = "Brush Script MT"
- FontSize = 24
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H000000FF&
- Height = 732
- Left = 1080
- TabIndex = 4
- Top = 2400
- Width = 3852
- End
- Begin Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Index = 0
- Left = 840
- MousePointer = 3 'I-Beam
- TabIndex = 1
- Top = 1500
- Width = 435
- End
- Begin Label Label1
- Alignment = 2 'Center
- Caption = "Your numbers for this week are :"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 18
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 492
- Left = 480
- TabIndex = 0
- Top = 360
- Width = 5292
- End
- Begin Shape Shape1
- BackColor = &H00C0C0C0&
- BackStyle = 1 'Opaque
- BorderColor = &H00404040&
- Height = 735
- Index = 0
- Left = 720
- Shape = 3 'Circle
- Top = 1320
- Width = 675
- End
- Begin Shape Shape1
- BackColor = &H00C0C0C0&
- BackStyle = 1 'Opaque
- BorderColor = &H00404040&
- Height = 735
- Index = 5
- Left = 4920
- Shape = 3 'Circle
- Top = 1320
- Width = 675
- End
- Begin Shape Shape1
- BackColor = &H00C0C0C0&
- BackStyle = 1 'Opaque
- BorderColor = &H00404040&
- Height = 735
- Index = 4
- Left = 4080
- Shape = 3 'Circle
- Top = 1320
- Width = 675
- End
- Begin Shape Shape1
- BackColor = &H00C0C0C0&
- BackStyle = 1 'Opaque
- BorderColor = &H00404040&
- Height = 735
- Index = 3
- Left = 3240
- Shape = 3 'Circle
- Top = 1320
- Width = 675
- End
- Begin Shape Shape1
- BackColor = &H00C0C0C0&
- BackStyle = 1 'Opaque
- BorderColor = &H00404040&
- Height = 735
- Index = 2
- Left = 2400
- Shape = 3 'Circle
- Top = 1320
- Width = 675
- End
- Begin Shape Shape1
- BackColor = &H00C0C0C0&
- BackStyle = 1 'Opaque
- BorderColor = &H00404040&
- Height = 735
- Index = 1
- Left = 1560
- Shape = 3 'Circle
- Top = 1320
- Width = 675
- End
- Begin Menu Opts
- Caption = "&Options"
- Begin Menu abt
- Caption = "&About"
- End
- Begin Menu Endit
- Caption = "&Exit"
- Shortcut = ^X
- End
- End
- Dim NumBalls%
- Dim Winners%(1 To 6)
- Sub abt_Click ()
- form1.Hide
- form2.Show
- End Sub
- Sub Command1_Click ()
- rando 'call generator
- End Sub
- Sub Endit_Click ()
- End Sub
- Sub ex_Click ()
- End Sub
- Sub exit_Click ()
- MsgBox "!"
- End Sub
- Sub Form_Load ()
- label3.Visible = True 'set the environment
- Timer1.Interval = 300
- timer2.Interval = 500
- startwindowscroll 'start the scrolling title screen
- 'The windowscroll routine is located in a seperate
- ' .BAS file (Don't ask me why other than it has to have a global
- 'declaration !
- End Sub
- Sub Ian_Click ()
- form2.Show 1
- End Sub
- Sub menu1_Click ()
- End Sub
- Sub rando ()
- Dim inum%, n%, Temp%
- Randomize ' set seed
- ReDim Balls%(1 To 49)
- Dim LoopCheck%, NoSwap%
- timer2.Enabled = False ' ball display timer
- For n = 0 To 5
- form1.Label2(n).Caption = "" 'clear the display
- form1.Shape1(n).BackColor = &HC0C0C0 ' grey
- Next n
- For n = 1 To 49: Balls%(n) = n: Next n
- For n = 1 To 6
- LoopCheck = 0
- Do
- inum = Int(49 * Rnd + 1) ' generate the numbers
- Loop Until (Balls%(inum) > 0) Or (LoopCheck > 99)
- If LoopCheck > 99 Then
- MsgBox "Error generating numbers"
- Exit Sub
- End If
- Balls%(inum) = 0
- Winners%(n) = inum
- Next n ' got 6 random numbers
- Do ' bubble sort array
- NoSwap = True
- For n = 1 To 5
- If Winners%(n + 1) < Winners%(n) Then
- Temp = Winners%(n + 1)
- Winners%(n + 1) = Winners%(n)
- Winners%(n) = Temp
- NoSwap = False
- End If
- Next n
- Loop Until NoSwap%
- timer2.Enabled = True ' this starts the display
- NumBalls = 1 ' timer to show the balls
- ' one by one. See Timer2_Click
- ' routine.
- End Sub
- Sub Timer1_Timer ()
- irndcolor = Int(Rnd * 14 + 1) 'random colours on the Thank You
- label3.ForeColor = QBColor(irndcolor)
- WinTitle = Mid(WinTitle, 2) & Left(WinTitle, 1) 'scroll the titles
- form1.Caption = WinTitle
-
- End Sub
- Sub Timer2_Timer ()
- Dim BNum%, BCol&
- If NumBalls > 6 Then Exit Sub
- BNum = Winners%(NumBalls) ' the ball number
- If BNum < 10 Then BCol = &HFFFFFF 'white
- If BNum >= 10 And BNum < 20 Then BCol = &HFF8080 'blue
- If BNum >= 20 And BNum < 30 Then BCol = &H8080FF 'Pink
- If BNum >= 30 And BNum < 40 Then BCol = &HFF00& 'Green
- If BNum >= 40 Then BCol = &HFFFF& 'Yellow
- form1.Shape1(NumBalls - 1).BackColor = BCol
- form1.Label2(NumBalls - 1).Caption = BNum
- NumBalls = NumBalls + 1
- End Sub
-